

package com.css.dzj.dzjap.sys.log.service.impl;

import com.css.dzj.dzjap.sys.log.service.SysLogService;
import com.css.dzj.dzjap.sys.log.entity.SysLogEntity;
import com.css.dzj.dzjap.sys.log.mapper.SysLogMapper;
import com.querydsl.jpa.impl.JPAQueryFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.stereotype.Service;


/**
 * 系统日志
 * @author zhouCH
 */
@Service
public class SysLogServiceImpl implements SysLogService {

    @Autowired
    private SysLogMapper sysLogMapper;

    @Autowired
    private JPAQueryFactory jpaQueryFactory;

    /***
     * 分页查询
     * @param pageable
     * @return
     */
    @Override
    public Page<SysLogEntity> getPage(Pageable pageable) {
        Page<SysLogEntity> all = sysLogMapper.findAll(pageable);
        return all;
    }

    /***
     * 保存日志
     * @param sysLogEntity
     */
    @Override
    public void save(SysLogEntity sysLogEntity) {
        sysLogMapper.save(sysLogEntity);
    }
}
